home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / fgl110c.zip / 09-16.C < prev    next >
Text File  |  1992-01-31  |  711b  |  39 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. char arrow[] = {6,1,9,2,2,9,1,19,7,2,8,1};
  8.  
  9. void main()
  10. {
  11.    int old_mode;
  12.  
  13.    if (fg_testmode(4,1) == 0) {
  14.       printf("This program requires a 320 ");
  15.       printf("x 200 CGA graphics mode.\n");
  16.       exit(1);
  17.       }
  18.  
  19.    old_mode = fg_getmode();
  20.    fg_setmode(4);
  21.    fg_setclip(0,15,0,199);
  22.  
  23.    fg_setcolor(3);
  24.    fg_rect(0,319,0,199);
  25.  
  26.    fg_move(10,10);
  27.    fg_drawmask(arrow,12,10);
  28.    fg_move(10,20);
  29.    fg_clipmask(arrow,12,10);
  30.    fg_move(10,30);
  31.    fg_revmask(arrow,12,10);
  32.    fg_move(10,40);
  33.    fg_flipmask(arrow,12,10);
  34.    fg_waitkey();
  35.  
  36.    fg_setmode(old_mode);
  37.    fg_reset();
  38. }
  39.